import {http} from '@/api/http.js'
export const getDetail = (params) => {
	return http.get('/user/getDetail', {
		params
	})
}

//登录
export const userLogin = (data) => {
	return http.post('/user/login', data)
}

//  随机100道题目 模拟考试试卷
export const getUserExam = (params) => {
	return http.get('/user/getUserExam', {
		params
	})
}

// 获取用户练习试卷
export const getTestPaper = (params) => {
	return http.get('/user/getTestPaper', {
		params
	})
}

// 获取用户练习试卷
export const getPaperList = (params) => {
	return http.get('/user/getPaperList', {
		params
	})
}



export const postTestPaper = (data) => {
	return http.post('/user/addTestPaper', data)
}

export const getTestPaperDetail = (params) => {
	return http.get('/user/getTestPaperDetail', {
		params
	})
}



export const getTestPaperList = (params) => {
	return http.get('/user/getTestPaper', {
		params
	})
}

export const getUserInfo = (params) => {
	return http.get('/user/getDetail', {
		params
	})
}

export const getSubPaper = (params) => {
	return http.get('/sub/getSubPaper', {
		params
	})
}

export const addSubPaper = (data) => {
	return http.post('/sub/addSubPaper', data)
}


export const getSubPaperList = (params) => {
	return http.get('/sub/getPaperList', {
		params
	})
}


export const getSubPaperDetail = (params) => {
	return http.get('/sub/getPaperDetail', {
		params
	})
}

export const getSub1TypeList = (params) => {
	return http.get('/subOne/getSubOnePaper', {
		params
	})
}

export const postSub1Paper = (data) => {
	return http.post('/subOne/addOnePaper', data)
}

export const register = (data) => {
	return http.post('/user/reg', data)
}


// 科目一试卷详情
export const getSub1PaperDetail = (params) => {
	return http.get('/subOne/getPaperDetail', {
		params
	})
}

// 科目一试卷列表
export const getSub1PaperList = (params) => {
	return http.get('/subOne/getPaperList', {
		params
	})
}
